(1) Field of the Invention
The present invention relates to an image processing apparatus, and particularly to a technique for decreasing deterioration of image quality in an image forming apparatus that forms an image based on digital image data.
(2) Description of Related Art
In image forming apparatuses that form an image based on digital image data, various image processing such as smoothing and edge enhancement is generally employed to improve image quality. Such image processing is performed on pixels of image data in accordance with an image type, examples of which include a character image and a halftone-dot image. To be more specific, a pixel that is judged to be in a halftone-dot area is typically subjected to smoothing, and a pixel that is judged to be in an edge area of a character is typically subjected to edge enhancement.
Here, the following describes an example of a method for judging whether each of pixels included in image data is in a halftone-dot area or not. Each pixel is set as a target pixel to be judged. The first judgment is performed as to whether the target pixel corresponds to an isolated pixel or not, using a filter of a predetermined size including the target pixel as the center. Then, the second judgment is performed as to whether the target pixel is in a halftone-dot area or not, by counting the number of isolated pixels present in a predetermined area including the target pixel. Note here that isolated pixels are categorized into two: black isolated pixel; and white isolated pixel. A white isolated pixel is a pixel with high brightness that stands isolated in a background of pixels with low brightness, whereas a black isolated pixel is a pixel with low brightness that stands isolated in a background of pixels with high brightness. In either case, one or more isolated pixels can construct one dot in a halftone-dot area.
According to this halftone-dot area judgment method, an isolated pixel filter is used in the first judgment, an example of which is a filter consisting of 5 (vertical)*5 (horizontal) pixels as shown in FIG. 1. In this case, assuming brightness of a target pixel “V33” as “L33”, brightness of a nearby pixel “V22” as “L22”, and brightness of a nearby pixel “V23” as “L23”, etc., the target pixel “V33” is judged to correspond to a white isolated pixel when at least one of the following conditions: inequality (1); inequality (2); and inequality (3), is satisfied.
Inequality 1
                L33>MAX (L22, L23, L24, L34, L44, L43, L42, L32)Inequality 2        L33>MAX (L11, L12, L13, L14, L15, L25, L35, L45, L55, L54, L53, L52, L51, L41, L31, L21)Inequality 3        L33>MAX{ (L11+L22)/2, (L13+L23)/2, (L15+L24)/2, (L55+L44)/2, (L53+L43)/2, (L51+L42)/2}        
Then, in the second judgment, a filter with a larger size than the above isolated pixel filter is used, an example of which is a filter consisting of 9 (vertical)*45 (horizontal) pixels including the target pixel, and the number of isolated pixels present therein is counted. When the count number of the isolated pixels is above a predetermined threshold, the target pixel is judged to be in a halftone-dot area.
However, the above conventional image processing apparatuses have the problem that a pixel in an image of a character may not be recognized correctly but may be misjudged to be a pixel in a halftone-dot area. This may occur, for example, when an extremely small-sized image of a character “TA” (a character with the Kanji attribute which means “rice field” in Japanese (see FIG. 2)) is present. If such a pixel is misjudged to be in a halftone-dot area, smoothing is performed on the pixel. As a result of unnecessary smoothing, it becomes impossible to expect output of a character that can be recognized as a small-sized image of a character “TA”.
The following describes the above-mentioned misjudgment in more detail. FIG. 3A shows an example case where two extremely small-sized images of a character “TA” are present within a filter area consisting of 9 (vertical)*45 (horizontal) pixels as described above. In the example of the figure, each square is assumed to represent one pixel. In this case, according to the above conditions, solid black parts in FIG. 3B (32 pixels in total) are judged to correspond to isolated pixels.
Next, the following refers to an example of the number of isolated pixels to be detected in an actual halftone-dot area. FIG. 4A shows an example of a halftone-dot area in which white halftone-dots each consisting of 2 (vertical)*2 (horizontal) pixels are present sequentially. In the example of FIG. 4A, solid black parts shown in FIG. 4B are judged to correspond to isolated pixels, and therefore, the number of isolated pixels is 180 in total.
What should be noted here is that a size of a halftone-dot varies depending on each halftone-dot area. In some cases, a size of a halftone-dot may be much smaller than the above cases. FIG. 5A shows an example of a halftone-dot area in which white halftone-dots each consisting of one pixel are present at regular intervals. In the example of FIG. 5A, solid black parts shown in FIG. 5B are judged to correspond to isolated pixels, and therefore, the number of isolated pixels is 18 in total.
If a threshold of the number of isolated pixels is set in such a manner that the halftone-dot areas shown both in FIGS. 4A and 5A are correctly judged to be halftone-dot areas, therefore, pixels in an extremely small-sized image of a character “TA” shown in FIG. 3A are also judged to be pixels in a halftone-dot area.